<?php
require_once('modules/edanz_Feedback/SugarWidgets/SugarWidgetSubPanelTopButtonConstructFeedback.php');
require_once('custom/modules/Documents/SugarWidgets/SugarWidgetSubPanelTopCreateDocumentButton.php');
require_once('modules/edanz_ScheduleNotes/SugarWidgets/SugarWidgetSubPanelTopCreateScheduleNoteButton.php');
//require_once('modules/edanz_Probation/SugarWidgets/SugarWidgetSubPanelTopCreateProbationButton.php');

$layout_defs['edanz_Editor']['subpanel_setup'] = array(
		'tasks' => array(
                        'order' => 100,
                        'module' => 'Tasks',
                        'get_subpanel_data' => 'tasks',
                        'sort_order' => 'desc',
                        'sort_by' => 'date_start',
                        'subpanel_name' => 'ForEditors',
                        'title_key' => 'LBL_TASKS_SUBPANEL_TITLE',
                        'top_buttons' => array(
                        //        array('widget_class' => 'SubPanelTopButtonQuickCreate'),
			//array('widget_class' => 'SubPanelTopSelectButton'),
                        ),
        ),
		'email_history' => array(
			'order' => 125,
			'sort_order' => 'desc',
			'sort_by' => 'date_modified',
			'title_key' => 'LBL_EMAIL_HISTORY_SUBPANEL_TITLE',
			'type' => 'collection',
			'subpanel_name' => 'email_history',   //this values is not associated with a physical file.
			'module'=>'Emails',
			'top_buttons' => array(
		//		array('widget_class' => 'SubPanelTopArchiveEmailButton'),
				array('widget_class' => 'SubPanelTopComposeEmailButton'),
			),	
			'collection_list' => array(	
				'emails' => array(
					'module' => 'Emails',
					'subpanel_name' => 'ForEditor',
					'get_subpanel_data' => 'function:get_email_query',
					'generate_select'=>true,
					'function_parameters' => array(
						'return_as_array'=>'true',
					),
				),	
		     ),
		),

		'feedback' => array(
                        'order' => 150,
                        'module' => 'edanz_Feedback',
                        'get_subpanel_data' => 'feedback',
                        'sort_order' => 'desc',
                        'sort_by' => 'date_modified',
                        'subpanel_name' => 'ForEditors',
                        'title_key' => 'LBL_FEEDBACK_SUBPANEL_TITLE',
                        'top_buttons' => array(
                                array('widget_class' => 'SubPanelTopButtonConstructFeedback'),
                        ),
        	),

		'documents' => array (
			'order' => 180,
			'module' => 'Documents',
			'subpanel_name' => 'ForEditors',
			'sort_order' => 'asc',
			'sort_by' => 'id',
			'title_key' => 'LBL_EDITOR_DOCUMENTS_FROM_DOCUMENTS_TITLE',
			'get_subpanel_data' => 'documents',
			'top_buttons' => array (
				array ('widget_class' => 'SubPanelTopCreateDocumentButton'),
				array ('widget_class' => 'SubPanelTopSelectButton'),
			),
		),

		'authored_papers' => array(
                        'order' => 200,
                        'module' => 'edanz_AuthoredPaper',
                        'get_subpanel_data' => 'authored_papers',
                        'sort_order' => 'desc',
                        'sort_by' => 'publication_date',
                        'subpanel_name' => 'default',
                        'title_key' => 'LBL_AUTHORED_PAPERS_SUBPANEL_TITLE',
                        'top_buttons' => array(
                              array('widget_class' => 'SubPanelTopButtonQuickCreate'),
                        ),
        	),

		'qualifications' => array(
                        'order' => 300,
                        'module' => 'edanz_Qualification',
                        'get_subpanel_data' => 'qualifications',
                        'sort_order' => 'desc',
                        'sort_by' => 'dateachieved',
                        'subpanel_name' => 'default',
                        'title_key' => 'LBL_QUALIFICATIONS_SUBPANEL_TITLE',
                        'top_buttons' => array(
                                array('widget_class' => 'SubPanelTopButtonQuickCreate'),
                        ),
        	),

		'marketing_text' => array(
                        'order' => 400,
                        'module' => 'edanz_MarketingText',
                        'get_subpanel_data' => 'marketing_text',
                        'sort_order' => 'asc',
                        'sort_by' => 'messagetype',
                        'subpanel_name' => 'default',
                        'title_key' => 'LBL_MARKETING_TEXT_SUBPANEL_TITLE',
                        'top_buttons' => array(
                                array('widget_class' => 'SubPanelTopCreateButton'),
                        ),
        	),
	'beneficiaries' => array(
		'order' => 500,
		'module' => 'edanz_Beneficiaries',
		'get_subpanel_data' => 'beneficiaries',
		'sort_order' => 'desc',
		'sort_by' => 'date_entered',
		'subpanel_name' => 'default',
		'title_key' => 'LBL_BENEFICIARIES_SUBPANEL_TITLE',
		'top_buttons' => array(
				array('widget_class' => 'SubPanelTopButtonQuickCreate'),
				array ('widget_class' => 'SubPanelTopSelectButton'),
		),
	),
	
	'schedule_notes' => array(
		'order' => 600,
		'module' => 'edanz_ScheduleNotes',
		'get_subpanel_data' => 'schedule_notes',
		'sort_order' => 'desc',
		'sort_by' => 'date_modified',
		'subpanel_name' => 'default',
		'title_key' => 'LBL_SCHEDULENOTES_SUBPANEL_TITLE',
		'top_buttons' => array(
				array('widget_class' => 'SubPanelTopCreateScheduleNoteButton'),
		),
	),
	
	'probation' => array(
		'order' => 700,
		'module' => 'edanz_Probation',
		'get_subpanel_data' => 'probation',
		'sort_order' => 'desc',
		'sort_by' => 'activated_date',
		'subpanel_name' => 'default',
		'title_key' => 'LBL_PROBATION_SUBPANEL_TITLE',
		'top_buttons' => array(
				array('widget_class' => 'SubPanelTopCreateButton'),
		),
	),
);

?>
